package tgc.edu.library.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.library.custom.CommonService;
import tgc.edu.library.entity.Reader;
import tgc.edu.library.repository.ReaderRepository;

@Service
public class ReaderService extends CommonService<Reader, Integer>{

	@Autowired
	private ReaderRepository readerDAO;

	public Object findByPhone(String phone) {
		return readerDAO.findByPhone(phone);
	}

	public Object findByEmail(String email) {
		return readerDAO.findByEmail(email);
	}

	public Object findByUsername(String username) {
		return readerDAO.findByUsername(username);
	}

	public Reader findByOpenid(String openId) {
		return readerDAO.findByOpenid(openId);
	}
	
}
